rm(list = ls())  # delete everything that is in R's memory
#determine path, where the model is located
path <- path <- "C:/Users/PouwelsXGLV/Documents/Maastricht/Eribulin CEA/Model final/" #set location of model, to adapt!
source(paste(path,"R/01_fun_analyses.R"), sep = "")
load(paste(path,"data/01_model_inputs.R"), sep = "")
library(xlsx)
library(scales)
dfprob <- read.csv(paste(path,"output/03_probabilistic_results.csv", sep = ""), sep = ",")
r.CEAC <- calcCEAC(Q.trt = dfprob$TQ_disc.trt, C.trt = dfprob$TC_disc.trt,
Q.comp = dfprob$TQ_disc.comp, C.comp = dfprob$TC_disc.comp, v.wtp = v.wtp)
dfCEAC <- as.data.frame(r.CEAC)
limQALY  <- max(abs(dfprob$Inc.QALY)) #define limit Incremental QALY axis
limCosts <- max(abs(dfprob$Inc.Costs))#define limit Incremental QALY axis
#CE plane
tiff(file = paste(path,"figs/02_CEplane_paper.tif", sep = ""), res = 300, units= "cm", width = 10, height = 10)
ggplot(dfprob, aes(x = Inc.QALY, y = Inc.Costs)) +
geom_point(colour = "gray") +
xlab ("Incremental QALY") +
ylab("Incremental costs") +
geom_hline(yintercept = 0, linetype="dashed",
color = "black") +
geom_vline(xintercept = 0, linetype="dashed",
color = "black") +
geom_abline(intercept = 0, slope = 80000, linetype= "dotted",
color = "black") + # 80,000 per QALY threshold line
stat_ellipse(type = "t",#assumes multivariate t distribution, using "norm would assume a multivariate normal distribution, 95%CI
colour = "black",
level = 0.95, size = 1) +
xlim(c(-limQALY,limQALY)) +
scale_y_continuous(labels = dollar_format(prefix = "\u20ac ", suffix = ""),
limits = c(-limCosts,limCosts)) +
theme_bw()
dev.off()
rm(list = ls())  # delete everything that is in R's memory
#determine path, where the model is located
path <- path <- "C:/Users/PouwelsXGLV/Documents/Maastricht/Eribulin CEA/Model final/" #set location of model, to adapt!
source(paste(path,"R/01_fun_analyses.R"), sep = "")
load(paste(path,"data/01_model_inputs.R"), sep = "")
library(xlsx)
library(scales)
library(ggplot2)
dfprob <- read.csv(paste(path,"output/03_probabilistic_results.csv", sep = ""), sep = ",")
r.CEAC <- calcCEAC(Q.trt = dfprob$TQ_disc.trt, C.trt = dfprob$TC_disc.trt,
Q.comp = dfprob$TQ_disc.comp, C.comp = dfprob$TC_disc.comp, v.wtp = v.wtp)
dfCEAC <- as.data.frame(r.CEAC)
limQALY  <- max(abs(dfprob$Inc.QALY)) #define limit Incremental QALY axis
limCosts <- max(abs(dfprob$Inc.Costs))#define limit Incremental QALY axis
#CE plane
tiff(file = paste(path,"figs/02_CEplane_paper.tif", sep = ""), res = 300, units= "cm", width = 10, height = 10)
ggplot(dfprob, aes(x = Inc.QALY, y = Inc.Costs)) +
geom_point(colour = "gray") +
xlab ("Incremental QALY") +
ylab("Incremental costs") +
geom_hline(yintercept = 0, linetype="dashed",
color = "black") +
geom_vline(xintercept = 0, linetype="dashed",
color = "black") +
geom_abline(intercept = 0, slope = 80000, linetype= "dotted",
color = "black") + # 80,000 per QALY threshold line
stat_ellipse(type = "t",#assumes multivariate t distribution, using "norm would assume a multivariate normal distribution, 95%CI
colour = "black",
level = 0.95, size = 1) +
xlim(c(-limQALY,limQALY)) +
scale_y_continuous(labels = dollar_format(prefix = "\u20ac ", suffix = ""),
limits = c(-limCosts,limCosts)) +
theme_bw()
dev.off()
rm(list = ls())  # delete everything that is in R's memory
#determine path, where the model is located
path <- path <- "C:/Users/PouwelsXGLV/Documents/Maastricht/Eribulin CEA/Model final/" #set location of model, to adapt!
source(paste(path,"R/01_fun_analyses.R"), sep = "")
load(paste(path,"data/01_model_inputs.R"), sep = "")
source(paste(path,"R/01_fun_analyses.R", sep = ""))
load(paste(path,"data/01_model_inputs.R", sep = ""))
library(xlsx)
library(scales)
library(ggplot2)
dfprob <- read.csv(paste(path,"output/03_probabilistic_results.csv", sep = ""), sep = ",")
ggplot(dfprob, aes(x = Inc.QALY, y = Inc.Costs)) +
geom_point(colour = "gray") +
xlab ("Incremental QALY") +
ylab("Incremental costs") +
geom_hline(yintercept = 0, linetype="dashed",
color = "black") +
geom_vline(xintercept = 0, linetype="dashed",
color = "black") +
geom_abline(intercept = 0, slope = 80000, linetype= "dotted",
color = "black") + # 80,000 per QALY threshold line
stat_ellipse(type = "t",#assumes multivariate t distribution, using "norm would assume a multivariate normal distribution, 95%CI
colour = "black",
level = 0.95, size = 1) +
xlim(c(-limQALY,limQALY)) +
scale_y_continuous(labels = dollar_format(prefix = "\u20ac ", suffix = ""),
limits = c(-limCosts,limCosts)) +
theme_bw()
limQALY  <- max(abs(dfprob$Inc.QALY)) #define limit Incremental QALY axis
limCosts <- max(abs(dfprob$Inc.Costs))#define limit Incremental QALY axis
ggplot(dfprob, aes(x = Inc.QALY, y = Inc.Costs)) +
geom_point(colour = "gray") +
xlab ("Incremental QALY") +
ylab("Incremental costs") +
geom_hline(yintercept = 0, linetype="dashed",
color = "black") +
geom_vline(xintercept = 0, linetype="dashed",
color = "black") +
geom_abline(intercept = 0, slope = 80000, linetype= "dotted",
color = "black") + # 80,000 per QALY threshold line
stat_ellipse(type = "t",#assumes multivariate t distribution, using "norm would assume a multivariate normal distribution, 95%CI
colour = "black",
level = 0.95, size = 1) +
xlim(c(-limQALY,limQALY)) +
scale_y_continuous(labels = dollar_format(prefix = "\u20ac ", suffix = ""),
limits = c(-limCosts,limCosts)) +
theme_bw()
ggplot(dfprob, aes(x = Inc.QALY, y = Inc.Costs)) +
geom_point(colour = "gray") +
geom_point(colour = "black", aes(x = mean(Inc.QALY), y = mean(Inc.Costs)))+
xlab ("Incremental QALY") +
ylab("Incremental costs") +
geom_hline(yintercept = 0, linetype="dashed",
color = "black") +
geom_vline(xintercept = 0, linetype="dashed",
color = "black") +
geom_abline(intercept = 0, slope = 80000, linetype= "dotted",
color = "black") + # 80,000 per QALY threshold line
stat_ellipse(type = "t",#assumes multivariate t distribution, using "norm would assume a multivariate normal distribution, 95%CI
colour = "black",
level = 0.95, size = 1) +
xlim(c(-limQALY,limQALY)) +
scale_y_continuous(labels = dollar_format(prefix = "\u20ac ", suffix = ""),
limits = c(-limCosts,limCosts)) +
theme_bw()
tiff(file = paste(path,"figs/02_CEplane_thesis.tif", sep = ""), res = 300, units= "cm", width = 10, height = 10)
ggplot(dfprob, aes(x = Inc.QALY, y = Inc.Costs)) +
geom_point(colour = "gray") +
geom_point(colour = "black", aes(x = mean(Inc.QALY), y = mean(Inc.Costs)))+
xlab ("Incremental QALY") +
ylab("Incremental costs") +
geom_hline(yintercept = 0, linetype="dashed",
color = "black") +
geom_vline(xintercept = 0, linetype="dashed",
color = "black") +
geom_abline(intercept = 0, slope = 80000, linetype= "dotted",
color = "black") + # 80,000 per QALY threshold line
stat_ellipse(type = "t",#assumes multivariate t distribution, using "norm would assume a multivariate normal distribution, 95%CI
colour = "black",
level = 0.95, size = 1) +
xlim(c(-limQALY,limQALY)) +
scale_y_continuous(labels = dollar_format(prefix = "\u20ac ", suffix = ""),
limits = c(-limCosts,limCosts)) +
theme_bw()
dev.off()
tiff(file = paste(path,"figs/02_CEplane_thesis.tif", sep = ""), res = 300, units= "cm", width = 10, height = 10)
ggplot(dfprob, aes(x = Inc.QALY, y = Inc.Costs)) +
geom_point(colour = "gray") +
geom_point(colour = "black", aes(x = mean(Inc.QALY), y = mean(Inc.Costs)))+
xlab ("Incremental QALY") +
ylab("Incremental costs") +
geom_hline(yintercept = 0, linetype="dashed",
color = "black") +
geom_vline(xintercept = 0, linetype="dashed",
color = "black") +
geom_abline(intercept = 0, slope = 80000, linetype= "dotted",
color = "black") + # 80,000 per QALY threshold line
stat_ellipse(type = "t",#assumes multivariate t distribution, using "norm would assume a multivariate normal distribution, 95%CI
colour = "black",
level = 0.95, size = 1) +
xlim(c(-limQALY,limQALY)) +
scale_y_continuous(labels = dollar_format(prefix = "\u20ac ", suffix = ""),
limits = c(-limCosts,limCosts)) +
theme_bw()
dev.off()
